package com.xyzh05.util;


public class PageUtil {
	
    /**
     * 根据当前页面和每页记录数获得起始记录
     * @return 
     */
    public static Integer getStartNum(Integer currentPage, Integer pageSize){
    	if(currentPage == 1){
        	return 0;
    	}else{
    		return (pageSize * (currentPage -1));    		
    	}
    }

    /**
     * 根据当前页面和每页记录数获得终止记录
     * @return 
     */
    public static Integer getEndNum(Integer currentPage, Integer pageSize){
    	return pageSize * currentPage;
    }
}
